package com.pa165.languageschoolservice.service;

import com.pa165.languageschoolpersistence.Exceptions.ServiceFailureException;
import com.pa165.languageschoolservice.DTO.CourseDTO;
import com.pa165.languageschoolservice.DTO.LectorDTO;
import com.pa165.languageschoolservice.DTO.LectureDTO;
import com.pa165.languageschoolservice.DTO.StudentDTO;
import java.util.List;

/**
 * @author Tomas Hruby
 *
 * Represents lecture service functionality for lecture entity(DTO).
 */
public interface LectureService {

    /**
     * Adds lecture.
     *
     * @param lecture input lecture
     * @return lecture added
     * @throws ServiceFailureException if any error occurs
     */
    public LectureDTO add(LectureDTO lecture) throws ServiceFailureException;

    /**
     * Removes lecture.
     *
     * @param lecture input lecture
     * @throws ServiceFailureException if any error occurs
     */
    public void remove(LectureDTO lecture) throws ServiceFailureException;

    /**
     * Modifies lecture.
     *
     * @param lecture lecture to modify
     * @return modified lecture
     * @throws ServiceFailureException if any error occurs.
     */
    public LectureDTO modify(LectureDTO lecture) throws ServiceFailureException;

    /**
     * Gets lecture.
     *
     * @param id id of lecture
     * @return lecture requested
     * @throws ServiceFailureException if any error occurs.
     */
    public LectureDTO get(Long id) throws ServiceFailureException;

    /**
     * Gets all the lectures.
     *
     * @return List of lectures
     */
    public List<LectureDTO> getAll();

    /**
     * Gets lectures with the given lector.
     *
     * @param lector lector
     * @return lectures that are taught by lector
     * @throws ServiceFailureException if any error occurs.
     */
    public List<LectureDTO> getLectures(LectorDTO lector) throws ServiceFailureException;

    /**
     * Gets lectures with the given course.
     *
     * @param course course
     * @return lectures that are a part of course
     * @throws ServiceFailureException if any error occurs.
     */
    public List<LectureDTO> getLectures(CourseDTO course) throws ServiceFailureException;

    /**
     * Gets lectures with the given student.
     *
     * @param student student
     * @return lectures that are attended by student
     * @throws ServiceFailureException if any error occurs.
     */
    public List<LectureDTO> getLectures(StudentDTO student) throws ServiceFailureException;
}
